import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
import { Title } from '@angular/platform-browser';
import { MessageService } from './../../core/service/message.service';

@Component({
    selector: 'app-delPiece',
    templateUrl: './delPiece.component.html',
    styleUrls: ['./delPiece.component.scss'],
})
export class DelPieceComponent implements OnInit {

    @Input()
    config:DelConfig;
    @Input()
    datas:any;

    constructor(
        private _title: Title,
        private message: MessageService
    ) { }

    ngOnInit() {
    }
}
/**
 * @DelConfig   此对象是描述详情中固定的标签名
 * @delTitle    第一个标题
 * @items       需展示数据的标签与对应的数据字段
 * @onlyPicTitle 毕传图片标签      
 * @noPicTitle  选传图片标签      
 */
export interface DelConfig {
    delTitle: string;
    onlyPicTitle?: string;
    noPicTitle?: string;
    items: Array<KeyData>;
    imgItems?:Array<ImgData>
}
/**
 * @name 标签名
 * @key  对应的数据字段
 * @imgStyle  图片文件展示样式补充
 */
export interface KeyData {
    name: string;
    key: string;
    imgStyle?: string
}
/**
 * @name 标签名
 * @datas  对应数据字段
 */
export interface ImgData {
    name: string;
    datas: Array<KeyData>;
}